package emby.writer;

import emby.expr.*;
import emby.stmt.*;
import emby.*;
import emby.lang.*;

public interface IEmbyCodifier {
	public void block(ASTNode[] nodes);
	
	//expressions
	public void literal(Object val);
	public void variable(String name);
	public void list(Expression[] elements);
	public void fncall(Expression op, Expression[] args);
	public void opcall(EmbyFunction op, Expression[] args);
	public void lambda(Variable[] params, Block body);
	public void index(Expression arg, Expression index);
	public void dot(Expression arg1, String property);
	
	//statements
	public void assignment(Variable var, Expression val);
	public void compassign(Variable var, EmbyFunction op, Expression val);
	public void fndef(String name, Block body, Variable[] params);
	public void while_(Expression condition, Block body);
	public void for_(ASTNode initializer,Expression condition,ASTNode accumulator,Block body);
	public void fore(Variable var, Expression iterable, Block body);
	public void if_(Expression condition, Block body);
	public void ifelse(Expression condition, Block ifbody, Block elsebody);
	public void ret(Expression val);
	public void throw_(Expression val);
	public void trycatch(Block trybody, Variable catvar, Block catbody);
}
